<template>
  <div class='container'>
    <el-card class="box-card">
      <div class="illustrate">
        <span class="description-content">说明: 目前仅支持学科和关键字条件筛选</span>
        <div>
          <el-row>
            <el-button
              type="success"
              icon="el-icon-edit"
            >
              新增试题
            </el-button>
          </el-row>
        </div>
      </div>
      <div class="choose">
        <div class="column">
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="学科"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="试题类型"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
        </div>
        <div class="column">
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="二级目录"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="难度"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
        </div>
        <div class="column">
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="标签"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="方向"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
        </div>
        <div class="button">
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
            style="width: 304px"
          >
            <el-form-item
              class="search"
              label="关键字"
            >
              <el-input
                v-model="value"
              />
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="录入人"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
        </div>
      </div>
      <div class="special">
        <div class="across">
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="题目备注"
            >
              <el-input
                v-model="value"
              />
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="企业简称"
            >
              <el-input
                v-model="value"
              />
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
          >
            <el-form-item
              class="search"
              label="城市"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
          <el-form
            ref="form"
            :model="form"
          >
            <el-form-item
              class="search"
            >
              <el-select
                v-model="value"
                placeholder="请选择"
              >
                <el-option
                  label="todo"
                  value="shanghai"
                />
              </el-select>
            </el-form-item>
          </el-form>
        </div>
        <el-row>
          <el-button>清空</el-button>
          <el-button type="primary">搜索</el-button>
        </el-row>
      </div>
      <template>
        <el-alert
          class="message"
          :title="`共 ${2} 条记录`"
          :closable="false"
          type="info"
          show-icon
        />
      </template>
      <template>
        <el-table
          :data="tableData"
          style="width: 100%">
          <el-table-column
            prop="date"
            label="试题编号"
            width="180">
          </el-table-column>
          <el-table-column
            prop="name"
            label="学科"
            width="180">
          </el-table-column>
          <el-table-column
            prop="address"
            label="目录">
          </el-table-column>
          <el-table-column
            prop="address"
            label="题型">
          </el-table-column>
          <el-table-column
            prop="address"
            label="题干">
          </el-table-column>
          <el-table-column
            prop="address"
            label="录入时间">
          </el-table-column>
          <el-table-column
            prop="address"
            label="难度">
          </el-table-column>
          <el-table-column
            prop="address"
            label="录入人">
          </el-table-column>
          <el-table-column
            prop="address"
            label="操作"
            width="200"
          >
          <el-row>
            <el-button
              class="view"
              type="primary"
              icon="el-icon-view"
              circle
            />
            <el-button
              class="edit"
              type="success"
              icon="el-icon-edit"
              circle
            />
            <el-button
              class="delete"
              type="danger"
              icon="el-icon-delete"
              circle
            />
            <el-button
              class="check"
              type="warning"
              icon="el-icon-check"
              circle
            />
          </el-row>
          </el-table-column>
        </el-table>
      </template>
      <div class="pagination">
        <el-pagination
          background
          layout="prev, pager, next, sizes, jumper"
          :total="1000"
        />
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input: '',
      value: '',
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  padding: 16px;

  .illustrate {
    display: flex;
    justify-content: space-between;
    // align-items: center;
    margin-bottom: 20px;

    .description-content {
      font-size: 13px;
      color: #ffc0cb;
    }
  }

  .choose {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(4, 1fr);
  }

  .tatle {
    display: flex;
    justify-content: space-between;

    .input {
      display: grid;
      grid-template-columns: repeat(1, 1fr);
      grid-gap: 16px;

      .choose {
        display: flex;

        .search {
          margin: auto 0;
        }
      }
    }
  }

  .special {
    display: flex;
    justify-content: space-between;

    .across {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
    }

    .el-row {
      width: 200px;
    }
  }

  .message {
    margin-bottom: 20px;
  }

  .view {
    background: #ecf5ff;
    color: #409eff;

    &:hover {
      background: #409eff;
      color: #fff;
    }
  }

  .edit {
    background: #f0f9eb;
    color: #67c23a;

    &:hover {
      background: #67c23a;
      color: #fff;
    }
  }

  .delete {
    background: #fef0f0;
    color: #f56c6c;

    &:hover {
      background: #f56c6c;
      color: #fff;
    }
  }

  .check {
    background: #fdf6ec;
    color: #e6a23c;

    &:hover {
      background: #e6a23c;
      color: #fff;
    }
  }

  .pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
  }
}
</style>
